GtkNotebook: Fix a problem with tab states
authorMatthias Clasen <mclasen@redhat.com>
Sat, 4 Jan 2014 18:01:49 +0000 (13:01 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 4 Jan 2014 18:01:49 +0000 (13:01 -0500)
When replacing the tab label, we were not adding the
active-page style class. Fix that.

gtk/gtknotebook.c

index 9e0944b3d73ee78d7968d933e673a1703f2e30e7..e40d2777296d934737f73f9bc6091b5808c5c91d 100644 (file)
@@ -7805,6 +7805,10 @@ gtk_notebook_set_tab_label (GtkNotebook *notebook,
                         G_CALLBACK (gtk_notebook_mnemonic_activate_switch_page),
                         notebook);
 
+  if (priv->cur_page == page)
+    gtk_style_context_add_class (gtk_widget_get_style_context (page->tab_label),
+                                "active-page");
+
   if (priv->show_tabs && gtk_widget_get_visible (child))
     {
       gtk_widget_show (page->tab_label);